package com.wiegand.util {

	/**
	 * @author kw
	 */
	 
	public class MixArray {	
			
		static public function mix( oldOne : Array ) : Array {
						
			var newOne : Array = new Array();
	
			for( var i : int = 0; i < oldOne.length; i++ ){
			
				var random : int;
				
				do {		
					random = RandomNumber.create( 0, oldOne.length - 1, true );
				}while( newOne[ random ] != undefined );
			
				newOne[ random ] = oldOne[ i ];
			
			}
		
			return newOne;
			
		}
	
	}
}
